endpoints.js
midway.route({
id: 'helloWorld',
label: 'Hello World',
path: '/helloWorld',
method: 'GET',
handler: function (req, reply) {
reply('Hello World');
}
});
Now start mock server and hit http://localhost:8000/helloWorld
midway.route({
id: 'helloUniverse',
label: 'Hello Universe',
path: '/helloUniverse',
method: 'GET',
handler: function (req, reply) {
reply('Hello Universe');
}
});
Now start mock server and hit http://localhost:8000/helloUniverse